package com.kiln.juxingqs.ui

import client.global.commlib.toast.toast
import com.kiln.juxingqs.BaseMiddleActivity
import com.kiln.juxingqs.R
import com.kiln.juxingqs.adapter.ProtocolTransferAdapter
import com.kiln.juxingqs.databinding.ActivityZrxyListBinding
import com.kiln.juxingqs.ui.vm.ZrXyListViewModel

/**
 * 点对点
 */
class ZrXyListActivity :
    BaseMiddleActivity<ZrXyListViewModel, ActivityZrxyListBinding>() {
    override fun getLayout(): Int {
        return R.layout.activity_zrxy_list
    }

    var type: Int? = 0

    val adapter: ProtocolTransferAdapter by lazy {
        ProtocolTransferAdapter(this, mImgLoader)
    }

    override fun initViewModel(): ZrXyListViewModel = createViewModel()

    override fun initView() {
        binding.event = this
        binding.vm = viewModel

        type = intent.getIntExtra("type", 0)
        toast("${type}")
    }

    override fun initData() {
        viewModel.name.value = "天贝成海2+"
        viewModel.sum.value = "999"
    }

}
